package design.mode.chain.item2;

import design.mode.chain.item1.HandlerA;
import design.mode.chain.item1.HandlerB;
import design.mode.chain.item1.HandlerChain;

import java.util.ArrayList;

public class Application {
    public static void main(String[] args) {
        design.mode.chain.item1.HandlerChain chain = new HandlerChain();
        chain.addHandler(new HandlerA());
        chain.addHandler(new design.mode.chain.item1.HandlerB());

        chain.addHandler(new design.mode.chain.item1.HandlerB());
        chain.addHandler(new HandlerB());


        chain.handle();
    }
}
